package org.example.util;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import sun.applet.AppletIOException;

public class IocUtil {
    private static ApplicationContext context;
    static {
        context =new  ClassPathXmlApplicationContext("beans.xml");
    }
    public static <T> T getBean(Class<T> tClass){
        return context.getBean(tClass);
    }
}
